]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Extend (+) button sensitivity to corner of screen, for Fittsability
authorDan Winship <danw@gnome.org>
Wed, 9 Sep 2009 13:45:13 +0000 (09:45 -0400)
committerDan Winship <danw@gnome.org>
Wed, 9 Sep 2009 15:31:50 +0000 (11:31 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=591984

js/ui/overview.js

index 0d66800eed9f17a095d6b87d34ed7c5586ec5e2e..3100893bcfa17434b1b372871616e1bd7082537b 100644 (file)
@@ -454,14 +454,20 @@ function AddWorkspaceButton(buttonSize, buttonX, buttonY, acceptDropCallback) {
 
 AddWorkspaceButton.prototype = {
     _init: function(buttonSize, buttonX, buttonY, acceptDropCallback) {
-        this.actor = new Clutter.Texture({ x: buttonX,
-                                           y: buttonY,
-                                           width: buttonSize,
-                                           height: buttonSize,
-                                           reactive: true });
-        this._acceptDropCallback = acceptDropCallback;
+        this.actor = new Clutter.Group({ x: buttonX,
+                                         y: buttonY,
+                                         width: global.screen_width - buttonX,
+                                         height: global.screen_height - buttonY,
+                                         reactive: true });
         this.actor._delegate = this;
-        this.actor.set_from_file(global.imagedir + 'add-workspace.svg');
+        this._acceptDropCallback = acceptDropCallback;
+
+        let plus = new Clutter.Texture({ x: 0,
+                                         y: 0,
+                                         width: buttonSize,
+                                         height: buttonSize });
+        plus.set_from_file(global.imagedir + 'add-workspace.svg');
+        this.actor.add_actor(plus);
     },
 
     // Draggable target interface